package lab02.Test19;

import java.util.Scanner;

/**
 * Created by Administrator on 2017/10/30.
 */
public class Test19 {
    public static void main(String[] args) {
        System.out.println("请输入你的字符串(英文的)：");
        Scanner sc = new Scanner(System.in);
        String string = sc.nextLine();
        for (int i = string.length() - 1; i >= 0; i--) {
            if (string.charAt(i) >= 'A' && string.charAt(i) <= 'Z') {
                System.out.print((char) (string.charAt(i) + 32));
            }
            if (string.charAt(i) >= 'a' && string.charAt(i) <= 'z') {
                System.out.print((char) (string.charAt(i) - 32));
            }
        }
    }
}